import grpc
from grpc_test.base_package import data_pb2, data_pb2_grpc

address = 'localhost:9999'

def run():
    conn = grpc.insecure_channel(address)
    client = data_pb2_grpc.FormatDataStub(channel=conn)
    response = client.DoFormat(data_pb2.act_request(text="wu hu qi fei"))
    print(response)
    print(response.text)

if __name__ == '__main__':
    run()
